package im.ok.back.controller;

import im.ok.back.common.ServerResponse;
import im.ok.back.service.INumberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("num")
public class NumberController {

    @Autowired
    private INumberService iNumberService;

    @GetMapping("getArrangementCount")
    public ServerResponse getArrangementCount(int num1, int num2) {
        return iNumberService.getArrangementCount(num1, num2);
    }

    @GetMapping("getCombinationCount")
    public ServerResponse getCombinationCount(int num1, int num2) {
        return iNumberService.getCombinationCount(num1, num2);
    }

}
